package com.hzlj.position.locate.controller.notify;


import com.fz.common.base.core.JsonUtils;
import com.fz.common.base.dto.ResultDTO;
import com.hzlj.common.message.common.dto.message.MessageNotifyDTO;
import com.hzlj.position.locate.service.AbnMissingJzryNoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 失联通知结果通知接口
 */
@Slf4j
@RestController
@RequestMapping("/position/abn/missing/message/notify")
public class AbnMissingMessageNotifyController {

    @Resource
    private AbnMissingJzryNoticeService abnMissingJzryNoticeService;

    /**
     * 点验-收到消息回调
     */
    @PostMapping("")
    public ResultDTO<String> notify(@RequestBody MessageNotifyDTO notify) {
        log.info("【疑似失联人员】收到消息回调:{}", JsonUtils.obj2json(notify));
        abnMissingJzryNoticeService.updateNoticeResult(notify);
        return ResultDTO.ok();
    }

}

